home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ASME's Mechanical Engine…ing Toolkit 1997 December
/
ASME's Mechanical Engineering Toolkit 1997 December.iso
/
mech_eng
/
mechan96.exe
/
RGEOM.BAS
< prev
next >
Wrap
BASIC Source File
|
1990-01-01
|
2KB
|
55 lines
10 REM RGEOM - November 1, 1988
20 PRINT : PRINT"Reading data from file ";PROB$
30 PROB$=LEFT$(PROB$,LEN(PROB$))
40 CLOSE #2 : OPEN "I",#2,PROB$
50 NP%=T1 : NFP%=T2 : NC%=T5 : NM%=T7
60 NPOS=PJ%
70 INPUT#2,D$
80 IF D$="K" THEN PRINT PROB$;" which contains KINEMATIC data"
90 IF D$="D" THEN PRINT PROB$;" which contains DYNAMICS data"
100 INPUT#2,NP%,NFP%,NC%,NM%,NPOS,INC,IPOS,IVEL,IACC
110 T1=NP% : T2=NFP% : T5=NC% : T7=NM%
120 FOR I= 1 TO NFP%
130 INPUT#2,FP%(I) : J= ABS(FP%(I)) : PN(J)= J
135 INPUT#2,FP(1,J),FP(2,J) : NEXT I
140 FOR I= 1 TO NC%
150 INPUT#2,CC%(I) : NEXT I
160 FOR I= 1 TO NM%
170 INPUT#2,L(I),M(I),I(I)
180 NEXT I
190 FOR I= 1 TO NC% : K(I)= CC%(I)
200 ON K(I) GOTO 210,220,230,240,250,260,270,280,290,300
210 CG%=10 : GOTO 310
220 CG%=10 : GOTO 310
230 CG%=13 : GOTO 310
240 CG%=8 : GOTO 310
250 CG%=17 : GOTO 310
260 CG%=16 : GOTO 310
270 CG%=17 : GOTO 310
280 CG%= 22 : GOTO 310
290 CG%=7 : GOTO 310
300 CG%=6 : GOTO 310
310 INPUT#2,K
320 FOR N=1 TO CG% : INPUT #2, G(I,N) : NEXT N
330 ON K GOTO 340,350,360,370,380,390,400,410,420,420
340 N1(I)=G(I,3) : N2(I)=G(I,4) : N3(I)=G(I,6) : GOTO 430
350 N1(I)=G(I,2) : N2(I)=G(I,3) : GOTO 430
360 N1(I)=G(I,2) : N2(I)=G(I,3) : N3(I)=G(I,4) : GOTO 430
370 N1(I)=G(I,3) : N2(I)=G(I,4) : N3(I)=G(I,6) : GOTO 430
380 N1(I)=G(I,2):N2(I)=G(I,3):N3(I)=G(I,4):N4(I)=G(I,10):N5(I)=G(I,11):GOTO 430
390 N1(I)=G(I,2):N2(I)=G(I,3):N3(I)=G(I,4):N4(I)=G(I,9):N5(I)=G(I,12):GOTO 430
400 N1(I)=G(I,2):N2(I)=G(I,3):N3(I)=G(I,4):N4(I)=G(I,10):N5(I)=G(I,13):GOTO 430
410 N1(I)=G(I,2):N2(I)=G(I,3):N3(I)=G(I,4):N4(I)=G(I,13):N5(I)=G(I,16)
415 N6(I)=G(I,6):N7(I)= G(I,7):N8(I)=G(I,5):N9(I)=G(I,22) : GOTO 430
420 N1(I)=G(I,2) : N2(I)=G(I,3) : GOTO 430
430 PN(N1)= N1(I):PN(N2)= N2(I):PN(N3)=N3(I):PN(N4)=N4(I):PN(N5)=N5(I)
435 PN(N8)= N8(I) : PN(N9)= N9(I) : NEXT I
440 FOR I= 1 TO NFP%
450 K= ABS(FP%(I))
460 FOR J= 1 TO 6 : INPUT#2,P(J,K) : NEXT J : NEXT I
470 SRET$=RET$ : SIRET%=IRET%
480 RET$="DYNAN" : IRET%=540 : CHAIN "GEOMPAR",,ALL
490 RET$=SRET$ : IRET%=SIRET%
500 PRINT"Return to ";RET$ : CHAIN RET$,IRET%,ALL
510 END